﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:vm="clr-namespace:MVVM.Northwind.Employee.ViewModel;assembly=MVVM.Northwind.Employee.ViewModel"
                    xmlns:v="clr-namespace:MVVM.Northwind.Employee.View;assembly=MVVM.Northwind.Employee.View">
    <DataTemplate DataType="{x:Type vm:EmployeeListViewModel}">
        <v:EmployeeListView/>
    </DataTemplate>
    <DataTemplate DataType="{x:Type vm:EmployeeViewModel}">
        <v:EmployeeView/>
    </DataTemplate>
    <DataTemplate DataType="{x:Type vm:HomePageViewModel}">
        <v:HomeView/>
    </DataTemplate>
    <DataTemplate x:Key="ClosableTabItemTemplate">
        <DockPanel Width="120">
            <Button Command="{Binding Path=CloseCommand}" Content="X"
                        Cursor="Hand" DockPanel.Dock="Right" Focusable="False"
                        FontFamily="Courier" FontSize="9" FontWeight="Bold" 
                        Margin="0,1,0,0" Padding="0" VerticalContentAlignment="Bottom"
                        Width="16" Height="16"/>
            <ContentPresenter Content="{Binding Path=DisplayName}" VerticalAlignment="Center"/>
        </DockPanel>
    </DataTemplate>
    <DataTemplate x:Key="WorkspacesTemplate">
        <TabControl IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding}" 
                    ItemTemplate="{StaticResource ClosableTabItemTemplate}"  Margin="4"/>
    </DataTemplate>
    <DataTemplate x:Key="CommandsTemplate">
        <Button Command="{Binding Command}" Content="{Binding DisplayName}" Width="Auto" Height="25"/>
    </DataTemplate>
</ResourceDictionary>